package com.wwtech.epp.ui.activity.mine.module;

import com.wwtech.epp.data.api.HttpAPIWrapper;
import com.wwtech.epp.ui.activity.base.ActivityScope;
import com.wwtech.epp.ui.activity.mine.MyInfoActivity;
import com.wwtech.epp.ui.activity.mine.contract.MyInfoContract;
import com.wwtech.epp.ui.activity.mine.presenter.MyInfoPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.mine
 * @Description: The moduele of MyInfoActivity, provide field for MyInfoActivity
 * @date 2017/08/31 21:07:09
 */
@Module
public class MyInfoModule {
    private final MyInfoContract.View mView;


    public MyInfoModule(MyInfoContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public MyInfoPresenter provideMyInfoPresenter(HttpAPIWrapper httpAPIWrapper, MyInfoActivity mActivity) {
        return new MyInfoPresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public MyInfoActivity provideMyInfoActivity() {
        return (MyInfoActivity) mView;
    }
}